Skip to content

fix: repair cross-package bugs so all tests and type checks pass - #99

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2155-1785256674
Open

fix: repair cross-package bugs so all tests and type checks pass#99
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2155-1785256674

Conversation

@stooit

@stooit stooit commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Repairs four cross-package bugs (plus a test-harness config gap) so that bun test and tsc --noEmit both pass cleanly. Fixes were scoped to only what the tests require — no test files or dependencies were changed.

Before: 9 failing tests, 5 type errors.
After: 13/13 tests pass, tsc --noEmit exits 0.

Changes

  • apps/web/src/lib/api.ts — updated import to the renamed hook in @e2e/utils (old useThrottle name still imported after rename), fixing TS2305.
  • bunfig.toml — added the DOM setup preload so React component tests have a document (fixes ReferenceError: document is not defined).
  • packages/ui/src/components/Button/Button.tsx — added aria-label for icon-only buttons (WCAG 2.2 SC 4.1.2).
  • packages/ui/src/components/DataTable/DataTable.tsx — fixed a stale-closure bug in the sort handler (functional state update) caught by the controlled re-render test.
  • packages/utils/src/format/date.ts — corrected the locale/format string in formatDate.

Verification

  • bun test → 13 pass / 0 fail
  • npx tsc --noEmit → exit 0
  • No test files modified; no new dependencies added.

Assumptions

  • The DOM test environment was intended to be wired via bunfig.toml preload (the setup file already existed); treated as a harness config gap rather than a source bug.

- api.ts: update import to renamed hook from @e2e/utils (was useThrottle)
- bunfig.toml: preload DOM setup so React component tests have document
- Button: add aria-label for icon-only buttons (WCAG 2.2 SC 4.1.2)
- DataTable: fix stale closure in sort handler (functional setState)
- date.ts: correct locale/format string for formatDate

No test files or dependencies changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant